import request from "@/utils/request"
export function getSetmealPage(params) {
    return request({
        url: '/setmeal/page',
        method: 'get',
        params
    })
}

export function deleteSetmeal(ids) {
    return request({
        url: '/setmeal',
        method: 'delete',
        params: { ids }
    })
}

export function editSetmeal(params) {
    return request({
        url: '/setmeal',
        method: 'put',
        data: { ...params }
    })
}

export function addSetmeal(params) {
    return request({
        url: '/setmeal',
        method: 'post',
        data: { ...params }
    })
}

export function querySetmealById(id) {
    return request({
        url: `/setmeal/${id}`,
        method: 'get'
    })
}

export function setmealStatusByStatus(params) {
    return request({
        url: `/setmeal/status/${params.status}`,
        method: 'post',
        params: {
            ids: params.ids
        }
    })
}